//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
//
// Use of this sample source code is subject to the terms of the Microsoft
// license agreement under which you licensed this sample source code. If
// you did not accept the terms of the license agreement, you are not
// authorized to use this sample source code. For the terms of the license,
// please see the license agreement between you and Microsoft or, if applicable,
// see the LICENSE.RTF on your install media or the root of your tools installation.
// THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES.
//
//////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2003 Intrinsyc Europe Ltd.
//////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2004 Siemens AG
//
// Version: 1.1.2.5
// Date:    11. Jan. 2006
//////////////////////////////////////////////////////////////////////////////


#define RIL_AUDIO_CONFIG_ROOT         (HKEY_LOCAL_MACHINE)
#define RIL_AUDIO_CONFIG_KEY          (TEXT("Software\\RIL\\Audio"))
#define RIL_AUDIO_CONFIG_HANDSET      (TEXT("Software\\RIL\\Audio\\Handset"))
#define RIL_AUDIO_CONFIG_SPEAKERPHONE (TEXT("Software\\RIL\\Audio\\Speakerphone"))
#define RIL_AUDIO_CONFIG_HEADSET      (TEXT("Software\\RIL\\Audio\\Headset"))
#define RIL_AUDIO_CONFIG_CARKIT       (TEXT("Software\\RIL\\Audio\\Carkit"))
#define RIL_AUDIO_CONFIG_SIEMENS_BLUETOOTHCARKIT       (TEXT("Software\\RIL\\Audio\\SiemensBlueToothCarkit"))
#define RIL_AUDIO_CONFIG_SIEMENS_BLUETOOTHHEADSET       (TEXT("Software\\RIL\\Audio\\SiemensBlueToothHeadSet"))
#define RIL_AUDIO_CONFIG_SIEMENS_GENERIC1       (TEXT("Software\\RIL\\Audio\\SiemensGeneric1"))
#define RIL_AUDIO_CONFIG_SIEMENS_GENERIC2       (TEXT("Software\\RIL\\Audio\\SiemensGeneric2"))

#define RIL_AUDIO_CONFIG_MODE         (TEXT("AudioMode"))
#define RIL_AUDIO_CONFIG_GAIN         (TEXT("BbcGain"))
#define RIL_AUDIO_CONFIG_SIDETONE     (TEXT("SideTone"))
#define RIL_AUDIO_CONFIG_SIDETONESTEPS     (TEXT("SideToneSteps"))
#define RIL_AUDIO_CONFIG_INTERFACE     (TEXT("Interface"))
#define RIL_AUDIO_CONFIG_MICROPHONE     (TEXT("Microphone"))
#define RIL_AUDIO_CONFIG_EARPIECE     (TEXT("Earpiece"))
#define RIL_AUDIO_CONFIG_TXACSTEPS    (TEXT("TxAcSteps"))
#define RIL_AUDIO_CONFIG_RXACSTEPS    (TEXT("RxAcSteps"))
#define RIL_AUDIO_CONFIG_TXMCSTEPS    (TEXT("TxMcSteps"))
#define RIL_AUDIO_CONFIG_RXMCSTEPS    (TEXT("RxMcSteps"))
#define RIL_AUDIO_CONFIG_DISABLE      (TEXT("ProfileDownloadDisable"))
#define RIL_AUDIO_VERSION_CHECK_DISABLE (TEXT("ProfileVersionCheckDisable"))

#define MAX_AUDIO_MODES     9
#define MAX_VOLUME_STEPS    6

typedef struct tagAudioConfig {
    DWORD   dwAudioMode;
    DWORD   dwGain;
    DWORD   dwSideToneSteps[MAX_VOLUME_STEPS];
    DWORD   dwInterface;
    DWORD   dwMicrophone;
    DWORD   dwEarpiece;
    DWORD   dwTxAcSteps[MAX_VOLUME_STEPS];
    DWORD   dwRxAcSteps[MAX_VOLUME_STEPS];
    DWORD   dwTxMcSteps[MAX_VOLUME_STEPS];
    DWORD   dwRxMcSteps[MAX_VOLUME_STEPS];
} AUDIO_CONFIG, *PAUDIO_CONFIG;

extern AUDIO_CONFIG g_acAudioConfig[MAX_AUDIO_MODES];
extern void GetAudioConfig(void);
int GetAudioTableIndex(int iAudioMode);

